#pragma once
#include<iostream>
#include<vector>
using namespace std;
namespace bit
{
	template<size_t N>
	class bitset
	{
	public:
		bitset()
		{
			size_t n = N / 32+1;
			_a.resize(n);
		}

		void set(size_t value)
		{
			size_t n1 = value / 32;
			size_t n2 = value % 32;
			_a[n1] |= 1 << n2;
		}

		void reset(size_t value)
		{
			size_t n1 = value / 32;
			size_t n2 = value % 32;
			_a[n1] &= (~(1 << n2));
		}

		bool Test(size_t value)
		{
			size_t n1 = value / 32;
			size_t n2 = value % 32;
			return _a[n1] & (1 << n2);
		}
	private:
		vector<size_t> _a;
	};
}